/*
 * @Author: wangdazhuang
 * @Date: 2024-10-16 15:09:03
 * @LastEditTime: 2024-10-16 15:15:51
 * @LastEditors: wangdazhuang
 * @Description: 
 * @FilePath: /pornhub_app/lib/src/http/special_code_pop.dart
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pornhub_app/utils/extension.dart';

import '../utils/color.dart';

class SpecialCodePop extends StatelessWidget {
  final String? title;
  final String desc;
  final VoidCallback tap;
  const SpecialCodePop(
      {super.key, this.title, required this.desc, required this.tap});
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300.w,
      height: 212.w,
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(12),
      ),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            height: 55.w,
            alignment: Alignment.center,
            decoration: BoxDecoration(
                border: Border(
                    bottom: BorderSide(color: COLOR.hexColor('#F0F0F0')))),
            child: Text(
              "温馨提示",
              style: TextStyle(
                  color: COLOR.hexColor("#333"),
                  fontWeight: FontWeight.bold,
                  fontSize: 16.w),
            ),
          ),
          Text(
            title ?? '',
            style: TextStyle(
                color: COLOR.hexColor("#333"),
                fontWeight: FontWeight.bold,
                fontSize: 16.w),
          ).marginTop(18.w),
          Text(desc,
                  style:
                      TextStyle(color: COLOR.hexColor("#333"), fontSize: 16.w))
              .marginTop(12.w),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Container(
                alignment: Alignment.center,
                width: 200.w,
                height: 36.w,
                decoration: BoxDecoration(
                  color: COLOR.hexColor("#F84242"),
                  borderRadius: BorderRadius.circular(20),
                ),
                child: Text("确定",
                    style: TextStyle(
                        color: COLOR.hexColor("#fff"),
                        fontSize: 16.w,
                        fontWeight: FontWeight.w500)),
              ).onTap(tap),
            ],
          ).marginTop(30.w)
        ],
      ),
    );
  }
}
